/***
 * @Author: 玄绮 shijiahansi@qq.com
 * @Date: 2024-06-08 10:02:32
 * @LastEditors: 玄绮 shijiahansi@qq.com
 * @LastEditTime: 2024-06-08 10:02:35
 * @FilePath: \server\dep\rdhttp\tools\tools.h
 * @Description:
 * @
 * @Copyright (c) 2024 by 玄绮, All Rights Reserved.
 */

#include <boost/algorithm/string/replace.hpp>
#if !defined(__TOOLS_H__)
#    define __TOOLS_H__
#    include <boost/beast/http.hpp>
#    include <boost/url.hpp>
#    include <boost/url/parse_query.hpp>
#    include <map>

namespace rdhttp {

    using StringMap = std::map<std::string, std::string>;
    // Append an HTTP rel-path to a local filesystem path.
    // The returned path is normalized for the platform.
    std::string
    path_cat(
        boost::beast::string_view base,
        boost::beast::string_view path);

    // Return a reasonable mime type based on the extension of a file.
    boost::beast::string_view
    mime_type(boost::beast::string_view path);

    
    std::string to_local(std::string str);
    std::string from_local(std::string str);
}  // namespace rdhttp

#endif  // __TOOLS_H__
